            <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-md-10">
                    <h2>分类管理</h2>
                    <ol class="breadcrumb">
                        <li>
                            <a href="{:U('Admin/Index/index')}">主页</a>
                        </li>
                        <li class="active">
                            <strong>分类管理</strong>
                        </li>
                    </ol>
                </div>
                <div class="col-md-2">
                    <h2><a class="btn btn-primary btn-rounded pull-right" href="{:U('Admin/Catalog/add')}">添加分类</a></h2>
                </div>
            </div>
            <div class="wrapper wrapper-content">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>所有分类</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">

                        <table class="table">
                            <thead>
                            <tr>

                                <th width="120">编号</th>
                                <th>分类名称</th>
                                <th width="120">操作</th>

                            </tr>
                            </thead>
                            <tbody>
                            <volist name="level1" id="l1">
                            <tr class="level1">
                                <td>{$l1.id}</td>
                                <td>{$l1.name}</td>
                                <td class="text-right">
                                    <div class="btn-group">
                                        <a href="{:U('Admin/Catalog/edit/id/'.$l1['id'])}" class="btn-white btn btn-xs">编辑</a>
                                        <a href="{:U('Admin/Catalog/delete/id/'.$l1['id'])}" class="btn-white btn btn-xs delete">删除</a>
                                    </div>
                                </td>
                            </tr>
                                <?php $level2=M('product_catalog')->where("parent_id = ".$l1['id'])->select()?>
                                <volist name="level2" id="l2">
                                <tr class="level2" id="level{$l2.id}">
                                    <td>{$l2.id}</td>
                                    <td>╰——{$l2.name}</td>
                                    <td class="text-right">
                                        <div class="btn-group">
                                            <a href="{:U('Admin/Catalog/edit/id/'.$l2['id'])}" class="btn-white btn btn-xs">编辑</a>
                                            <a href="{:U('Admin/Catalog/delete/id/'.$l2['id'])}" class="btn-white btn btn-xs delete">删除</a>
                                        </div>
                                    </td>
                                </tr>
                                    <?php $level3=M('product_catalog')->where("parent_id = ".$l2['id'])->select()?>
                                    <volist name="level3" id="l3">
                                    <tr class="level3 parent_level{$l2.id}">
                                        <td>{$l3.id}</td>
                                        <td>╰——╰——{$l3.name}</td>
                                        <td class="text-right">
                                            <div class="btn-group">
                                                <a href="{:U('Admin/Catalog/edit/id/'.$l3['id'])}" class="btn-white btn btn-xs">编辑</a>
                                                <a href="{:U('Admin/Catalog/delete/id/'.$l3['id'])}" class="btn-white btn btn-xs delete">删除</a>
                                            </div>
                                        </td>
                                    </tr>
                                    </volist>
                                </volist>
                            </volist>
                            </tbody>
                        </table>

                    </div>
                </div>
            </div>
    <script type="text/javascript">
        $(function(){
            $('.level2 td').click(function(){
                var id = $(this).parents('tr').attr('id');
                var cls = '.parent_'+id;
                $(cls).toggle('slow');
            });
        })
    </script>